package com.ruoyi.project.king.specification.service.impl;

import java.util.List;

import com.ruoyi.project.king.specification.domain.TSpecification;
import com.ruoyi.project.king.specification.mapper.TSpecificationMapper;
import com.ruoyi.project.king.specification.service.ITSpecificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.utils.text.Convert;

/**
 * 产品规格Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-05-19
 */
@Service
public class TSpecificationServiceImpl implements ITSpecificationService
{
    @Autowired
    private TSpecificationMapper tSpecificationMapper;

    /**
     * 查询产品规格
     * 
     * @param id 产品规格ID
     * @return 产品规格
     */
    @Override
    public TSpecification selectTSpecificationById(Long id)
    {
        return tSpecificationMapper.selectTSpecificationById(id);
    }

    /**
     * 查询产品规格列表
     * 
     * @param tSpecification 产品规格
     * @return 产品规格
     */
    @Override
    public List<TSpecification> selectTSpecificationList(TSpecification tSpecification)
    {
        return tSpecificationMapper.selectTSpecificationList(tSpecification);
    }

    /**
     * 新增产品规格
     * 
     * @param tSpecification 产品规格
     * @return 结果
     */
    @Override
    public int insertTSpecification(TSpecification tSpecification)
    {
        return tSpecificationMapper.insertTSpecification(tSpecification);
    }

    /**
     * 修改产品规格
     * 
     * @param tSpecification 产品规格
     * @return 结果
     */
    @Override
    public int updateTSpecification(TSpecification tSpecification)
    {
        return tSpecificationMapper.updateTSpecification(tSpecification);
    }

    /**
     * 删除产品规格对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTSpecificationByIds(String ids)
    {
        return tSpecificationMapper.deleteTSpecificationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除产品规格信息
     * 
     * @param id 产品规格ID
     * @return 结果
     */
    @Override
    public int deleteTSpecificationById(Long id)
    {
        return tSpecificationMapper.deleteTSpecificationById(id);
    }
}
